#include<iostream>
#include<vector>
using namespace std;
int main()
{
    vector<int> nums = { 1,2,3,4 };
        int n = nums.size();
        vector<int> f(n);
        vector<int> g(n);
        vector<int> ret(n);
        f[0] = 1;
        g[n - 1] = 1;
        for (int i = 1; i < n; i++)
        {
            f[i] = f[i - 1] * nums[i - 1];
        }
        for (int i = n - 2; i >= 0; i--)
        {
            g[i] = g[i + 1] * nums[i + 1];
        }
        for (int i = 0; i <= n - 1; i++)
        {
            ret[i] = g[i] * f[i];
        }

        return 0;
}